import wxx from 'weixin-js-sdk'
export const wxconfig = {
	async onLoad() {
		window.wx = wxx
		await this.getWxConfig()
	},
	methods: {
		async getWxConfig() {
			setTimeout(async ()=>{
				let res = await this.$u.api.wxConfig({
					js_api_list: 'openLocation,getLocation,previewImage,scanQRCode',
					debug: true,
					url: `${window.location.href}`,
				})
				console.log(res);
				if (res.status) {
					wx.config(res.msg)
				}
			},200)

		}
	}

}